library Wave16b initializer init requires LegacySystem

    private function Wave16b takes nothing returns nothing //Sniper Wave
        set udg_ZStart = 1200
        set udg_ZEnd = 2825
        call FogTransition(0.40)
        set udg_CurrentWave = 16
        call GenericActions.execute()
        call PolledWait(5.)
        call RandomSpawn2('z00F',1,IMinBJ(2,udg_Players)) //Marksman
        call StartSound(gg_snd_SniperHunt)
        call RandomSpawn2('z00C',2,GetRandomInt(0,1)) //Assasin
        call PolledWait(60.*udg_Pace)
        call GeneralText(5.0, "|cffcd950cCapt. Barnes|r : You're fighting a lost cause. If we don't level this place, there's no holding Zack back. This is our last chance to do something!" )
        call RandomSpawn2('z00C',2,GetRandomInt(0,1)) //Assasin
        call PolledWait(3.)
        call GeneralText(5.0, "|cffcd950cMarine|r : We don't know if a nuclear strike is going to have any effect on Zack. It may harm us more. You need to stop this." )
        call RandomSpawn2('z00F',1,IMinBJ(2,udg_Players)) //Marksman
        call RandomSpawn('u00C',2,IMinBJ(2,udg_Players)) //Gargoyle
        call GeneralText(5.0, "|cffcd950cCapt. Barnes|r : I lost my family in Boston. Zack's got to pay if it's the last thing I do." )
        call RandomSpawn('u00C',2,IMinBJ(2,udg_Players))
        call PolledWait(3.*udg_Pace)
        call GeneralText(5.0, "|cffcd950cCapt. Barnes|r : Everything I have... has been taken away." )
        call PolledWait(5.*udg_Pace)
        call ALICEText(5.0, "|cffcd950cALICE|r : Communications channel closed." )
        call PolledWait(10.*udg_Pace)
        call GeneralText(5.0, "|cffcd950cMarine|r : This is fubar!" )
        call PolledWait(10.*udg_Pace)
        if udg_SquadXP>95000 then
            call GankMarine(Player(9),'n00R',2+GetRandomInt(1,udg_Spawn),3500,4500) //Raven Mines
        endif
        call RandomSpawn('u00C',2,IMinBJ(2,udg_Players)) //Gargoyle
        call RandomSpawn('u00C',2,IMinBJ(2,udg_Players))
        call PolledWait(20.*udg_Pace)
        if udg_SquadXP>125000 then
            call GankMarine(Player(9),'n00R',2+GetRandomInt(1,udg_Spawn),3500,4500) //Raven Mines
        endif
        if GetRandomInt(0,5)==1 and udg_InitialPlayers>3 then
            call RandomSpawn2('z00G',1,1) //Sniper
        endif
        call RandomSpawn('u00C',2,IMinBJ(2,udg_Players)) //Gargoyle
        call RandomSpawn('u00C',2,IMinBJ(2,udg_Players))
        call RandomSpawn('u00C',2,IMinBJ(2,udg_Players))
        call PolledWait(60.*udg_Pace)
        if udg_Players>0 then
            call ExecuteRegisteredFunction("Wave17b")
            //call Wave17b.execute()
        endif
    endfunction


    private function init takes nothing returns nothing
        call RegisterFunction("Wave16b", function Wave16b)
    endfunction
    
endlibrary
